package procsim;

public class PaintArbitrator extends PaintTab{
    public PaintArbitrator(Paint parent){
        super(parent);
        //Coordinates
        Design.BUSYBUS.addCoords(this, 200, 30, 400, 30);
        Design.ATriStateRightResult.addCoords(this, Design.ATriStateRight.getResCoords(30)).addCoords(this, 325, 182, 325, 31).addCoords(this, 325, 112, 260, 112);
        Design.one.addCoords(this, Design.ATriStateRight.getInCoords(20));
        Design.busHOLD.addCoords(this, Design.ARSLeft.getQCoords(55)).addCoords(this, 275, 212, 275, 189);
        Design.ATriStateLeft2Result.addCoords(this, Design.ATriStateLeft2.getResCoords(46));
        Design.ATriStateLeft1Result.addCoords(this, Design.ATriStateLeft1.getResCoords(60)).addCoords(this, 85, 112, 85, 205).addCoords(this, Design.AAndLeft.getUpper2Coords(15));
        Design.AAndLeftResult.addCoords(this, Design.AAndLeft.getResCoords(30));
        Design.brqSTOP.addCoords(this, 90, 340, 150, 340).addCoords(this, 150, 340, 150, 258).addCoords(this, Design.ARSLeft.getRCoords(10)).addCoords(this, 150, 340, 390, 340).addCoords(this, 390, 340, 390, 258).addCoords(this, Design.ARSRight.getRCoords(10)).addCoords(this, 390, 340, 530, 340).addCoords(this, 530, 340, 530, 125).addCoords(this, Design.AAndRight.getLower2CoordsInv(30));
        Design.brqSTART.addCoords(this, Design.ARSRight.getSCoords(70)).addCoords(this, 390, 212, 390, 105).addCoords(this, 390, 105, 493, 105);
        Design.AOrResult.addCoords(this, Design.AOr.getResCoords(43));
        Design.bSTART.addCoords(this, Design.ARSRight.getQCoords(55)).addCoords(this, 515, 212, 515, 140).addCoords(this, 515, 140, 460, 140).addCoords(this, 460, 140, 460, 120).addCoords(this, Design.AOr.getLower2Coords(30));
        Design.BG3.addCoords(this, Design.AAndLeft.getLower2Coords(50)).addCoords(this, 50, 220, 50, 475).addCoords(this, 50, 475, 710, 475).addCoords(this, 710, 475, 710, 410);
        Design.BG2.addCoords(this, 590, 465, 680, 465).addCoords(this, 680, 465, 680, 410);
        Design.BG1.addCoords(this, 590, 450, 650, 450).addCoords(this, 650, 450, 650, 410);
        Design.BG0.addCoords(this, 590, 435, 620, 435).addCoords(this, 620, 435, 620, 410);
        Design.BRQ3.addCoords(this, 590, 117, 710, 117).addCoords(this, 710, 117, 710, 170);
        Design.BRQ2.addCoords(this, 610, 57, 680, 57).addCoords(this, 680, 57, 680, 170);
        Design.BRQ1.addCoords(this, 610, 77, 650, 77).addCoords(this, 650, 77, 650, 170);
        Design.BRQ0.addCoords(this, 610, 97, 620, 97).addCoords(this, 620, 97, 620, 170);
        Design.ACoderOut0.addCoords(this, 647, 270, 647, 310);
        Design.ACoderOut1.addCoords(this, 683, 270, 683, 310);
        Design.ACoderW.addCoords(this, 600, 220, 580, 220).addCoords(this, 580, 220, 580, 360).addCoords(this, 580, 360, 600, 360);
        //Collections
        elements.add(Design.ARSLeft);
        elements.add(Design.ARSRight);
        elements.add(Design.AAndLeft);
        elements.add(Design.AAndRight);
        elements.add(Design.AInverter);
        elements.add(Design.ATriStateLeft1);
        elements.add(Design.ATriStateLeft2);
        elements.add(Design.ATriStateRight);
        elements.add(Design.AOr);
        elements.add(Design.ACoder);
        elements.add(Design.ADecoder);
        
        lines.add(Design.busHOLD);
        lines.add(Design.brqSTART);
        lines.add(Design.brqSTOP);
        lines.add(Design.bSTART);
        lines.add(Design.BRQ0);
        lines.add(Design.BRQ1);
        lines.add(Design.BRQ2);
        lines.add(Design.BRQ3);
        lines.add(Design.BG0);
        lines.add(Design.BG1);
        lines.add(Design.BG2);
        lines.add(Design.BG3);
        lines.add(Design.ATriStateLeft1Result);
        lines.add(Design.ATriStateLeft1MResult);
        lines.add(Design.ATriStateLeft2Result);
        lines.add(Design.ATriStateRightResult);
        lines.add(Design.AAndLeftResult);
        lines.add(Design.AOrResult);
        lines.add(Design.ACoderOut0);
        lines.add(Design.ACoderOut1);
        lines.add(Design.ACoderW);
        lines.add(Design.one);
        lines.add(Design.BUSYBUS);
    }
}
